3.1.59 \(\int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x)) \, dx\) [59]

3.1.59.1 Optimal result
3.1.59.2 Mathematica [A] (verified)
3.1.59.3 Rubi [A] (verified)
3.1.59.4 Maple [A] (warning: unable to verify)
3.1.59.5 Fricas [A] (verification not implemented)
3.1.59.6 Sympy [F]
3.1.59.7 Maxima [B] (verification not implemented)
3.1.59.8 Giac [F]
3.1.59.9 Mupad [F(-1)]

3.1.59.1 Optimal result

Integrand size = 26, antiderivative size = 132 \[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x)) \, dx=\frac {2 a^{5/2} c \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}-\frac {2 a^3 c \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}-\frac {2 a^4 c \tan ^3(e+f x)}{f (a+a \sec (e+f x))^{3/2}}-\frac {2 a^5 c \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}} \]

output
2*a^(5/2)*c*arctan(a^(1/2)*tan(f*x+e)/(a+a*sec(f*x+e))^(1/2))/f-2*a^3*c*ta 
n(f*x+e)/f/(a+a*sec(f*x+e))^(1/2)-2*a^4*c*tan(f*x+e)^3/f/(a+a*sec(f*x+e))^ 
(3/2)-2/5*a^5*c*tan(f*x+e)^5/f/(a+a*sec(f*x+e))^(5/2)
 
3.1.59.2 Mathematica [A] (verified)

Time = 0.62 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.83 \[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x)) \, dx=-\frac {2 a^3 c \left (-5 \sqrt {c} \text {arctanh}\left (\frac {\sqrt {c-c \sec (e+f x)}}{\sqrt {c}}\right )+\sqrt {c-c \sec (e+f x)} \left (1+3 \sec (e+f x)+\sec ^2(e+f x)\right )\right ) \tan (e+f x)}{5 f \sqrt {a (1+\sec (e+f x))} \sqrt {c-c \sec (e+f x)}} \]

input
Integrate[(a + a*Sec[e + f*x])^(5/2)*(c - c*Sec[e + f*x]),x]
 
output
(-2*a^3*c*(-5*Sqrt[c]*ArcTanh[Sqrt[c - c*Sec[e + f*x]]/Sqrt[c]] + Sqrt[c - 
 c*Sec[e + f*x]]*(1 + 3*Sec[e + f*x] + Sec[e + f*x]^2))*Tan[e + f*x])/(5*f 
*Sqrt[a*(1 + Sec[e + f*x])]*Sqrt[c - c*Sec[e + f*x]])
 
3.1.59.3 Rubi [A] (verified)

Time = 0.41 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.90, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {3042, 4392, 3042, 4375, 364, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (a \sec (e+f x)+a)^{5/2} (c-c \sec (e+f x)) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^{5/2} \left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )dx\)

\(\Big \downarrow \) 4392

\(\displaystyle -a c \int (\sec (e+f x) a+a)^{3/2} \tan ^2(e+f x)dx\)

\(\Big \downarrow \) 3042

\(\displaystyle -a c \int \cot \left (e+f x+\frac {\pi }{2}\right )^2 \left (\csc \left (e+f x+\frac {\pi }{2}\right ) a+a\right )^{3/2}dx\)

\(\Big \downarrow \) 4375

\(\displaystyle \frac {2 a^4 c \int \frac {\tan ^2(e+f x) \left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+2\right )^2}{(\sec (e+f x) a+a) \left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1\right )}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )}{f}\)

\(\Big \downarrow \) 364

\(\displaystyle \frac {2 a^4 c \int \left (\frac {a \tan ^4(e+f x)}{(\sec (e+f x) a+a)^2}+\frac {3 \tan ^2(e+f x)}{\sec (e+f x) a+a}+\frac {1}{a}-\frac {1}{a \left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1\right )}\right )d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )}{f}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {2 a^4 c \left (\frac {\arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{a^{3/2}}-\frac {a \tan ^5(e+f x)}{5 (a \sec (e+f x)+a)^{5/2}}-\frac {\tan ^3(e+f x)}{(a \sec (e+f x)+a)^{3/2}}-\frac {\tan (e+f x)}{a \sqrt {a \sec (e+f x)+a}}\right )}{f}\)

input
Int[(a + a*Sec[e + f*x])^(5/2)*(c - c*Sec[e + f*x]),x]
 
output
(2*a^4*c*(ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]]/a^(3/2) 
- Tan[e + f*x]/(a*Sqrt[a + a*Sec[e + f*x]]) - Tan[e + f*x]^3/(a + a*Sec[e 
+ f*x])^(3/2) - (a*Tan[e + f*x]^5)/(5*(a + a*Sec[e + f*x])^(5/2))))/f
 

3.1.59.3.1 Defintions of rubi rules used

rule 364
Int[(((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_))/((c_) + (d_.)*(x_)^2), 
x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*((a + b*x^2)^p/(c + d*x^2)), x], x 
] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && (In 
tegerQ[m] || IGtQ[2*(m + 1), 0] ||  !RationalQ[m])
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4375
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n 
_.), x_Symbol] :> Simp[-2*(a^(m/2 + n + 1/2)/d)   Subst[Int[x^m*((2 + a*x^2 
)^(m/2 + n - 1/2)/(1 + a*x^2)), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c + d*x] 
]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && I 
ntegerQ[n - 1/2]
 

rule 4392
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*( 
d_.) + (c_))^(n_.), x_Symbol] :> Simp[((-a)*c)^m   Int[Cot[e + f*x]^(2*m)*( 
c + d*Csc[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && E 
qQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && RationalQ[n] &&  !( 
IntegerQ[n] && GtQ[m - n, 0])
 
3.1.59.4 Maple [A] (warning: unable to verify)

Time = 7.99 (sec) , antiderivative size = 190, normalized size of antiderivative = 1.44

method result size
default \(\frac {a^{2} c \left (5 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{\sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}}\right ) \left (\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1\right )^{\frac {5}{2}}+2 \left (1-\cos \left (f x +e \right )\right )^{5} \csc \left (f x +e \right )^{5}-10 \csc \left (f x +e \right )+10 \cot \left (f x +e \right )\right ) \sqrt {-\frac {2 a}{\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}}}{5 f \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )^{2} \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )-1\right )^{2}}\) \(190\)
parts \(\frac {2 c \,a^{2} \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (3 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \cos \left (f x +e \right )+3 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}+8 \sin \left (f x +e \right )+\tan \left (f x +e \right )\right )}{3 f \left (\cos \left (f x +e \right )+1\right )}-\frac {2 c \,a^{2} \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (43 \sin \left (f x +e \right )+14 \tan \left (f x +e \right )+3 \sec \left (f x +e \right ) \tan \left (f x +e \right )\right )}{15 f \left (\cos \left (f x +e \right )+1\right )}\) \(236\)

input
int((a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e)),x,method=_RETURNVERBOSE)
 
output
1/5*a^2*c/f*(5*2^(1/2)*arctanh(2^(1/2)/((1-cos(f*x+e))^2*csc(f*x+e)^2-1)^( 
1/2)*(-cot(f*x+e)+csc(f*x+e)))*((1-cos(f*x+e))^2*csc(f*x+e)^2-1)^(5/2)+2*( 
1-cos(f*x+e))^5*csc(f*x+e)^5-10*csc(f*x+e)+10*cot(f*x+e))*(-2*a/((1-cos(f* 
x+e))^2*csc(f*x+e)^2-1))^(1/2)/(-cot(f*x+e)+csc(f*x+e)+1)^2/(-cot(f*x+e)+c 
sc(f*x+e)-1)^2
 
3.1.59.5 Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 353, normalized size of antiderivative = 2.67 \[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x)) \, dx=\left [\frac {5 \, {\left (a^{2} c \cos \left (f x + e\right )^{3} + a^{2} c \cos \left (f x + e\right )^{2}\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right ) - 2 \, {\left (a^{2} c \cos \left (f x + e\right )^{2} + 3 \, a^{2} c \cos \left (f x + e\right ) + a^{2} c\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )}{5 \, {\left (f \cos \left (f x + e\right )^{3} + f \cos \left (f x + e\right )^{2}\right )}}, -\frac {2 \, {\left (5 \, {\left (a^{2} c \cos \left (f x + e\right )^{3} + a^{2} c \cos \left (f x + e\right )^{2}\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) + {\left (a^{2} c \cos \left (f x + e\right )^{2} + 3 \, a^{2} c \cos \left (f x + e\right ) + a^{2} c\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )\right )}}{5 \, {\left (f \cos \left (f x + e\right )^{3} + f \cos \left (f x + e\right )^{2}\right )}}\right ] \]

input
integrate((a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e)),x, algorithm="fricas")
 
output
[1/5*(5*(a^2*c*cos(f*x + e)^3 + a^2*c*cos(f*x + e)^2)*sqrt(-a)*log((2*a*co 
s(f*x + e)^2 - 2*sqrt(-a)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x 
+ e)*sin(f*x + e) + a*cos(f*x + e) - a)/(cos(f*x + e) + 1)) - 2*(a^2*c*cos 
(f*x + e)^2 + 3*a^2*c*cos(f*x + e) + a^2*c)*sqrt((a*cos(f*x + e) + a)/cos( 
f*x + e))*sin(f*x + e))/(f*cos(f*x + e)^3 + f*cos(f*x + e)^2), -2/5*(5*(a^ 
2*c*cos(f*x + e)^3 + a^2*c*cos(f*x + e)^2)*sqrt(a)*arctan(sqrt((a*cos(f*x 
+ e) + a)/cos(f*x + e))*cos(f*x + e)/(sqrt(a)*sin(f*x + e))) + (a^2*c*cos( 
f*x + e)^2 + 3*a^2*c*cos(f*x + e) + a^2*c)*sqrt((a*cos(f*x + e) + a)/cos(f 
*x + e))*sin(f*x + e))/(f*cos(f*x + e)^3 + f*cos(f*x + e)^2)]
 
3.1.59.6 Sympy [F]

\[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x)) \, dx=- c \left (\int \left (- a^{2} \sqrt {a \sec {\left (e + f x \right )} + a}\right )\, dx + \int \left (- a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec {\left (e + f x \right )}\right )\, dx + \int a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{2}{\left (e + f x \right )}\, dx + \int a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{3}{\left (e + f x \right )}\, dx\right ) \]

input
integrate((a+a*sec(f*x+e))**(5/2)*(c-c*sec(f*x+e)),x)
 
output
-c*(Integral(-a**2*sqrt(a*sec(e + f*x) + a), x) + Integral(-a**2*sqrt(a*se 
c(e + f*x) + a)*sec(e + f*x), x) + Integral(a**2*sqrt(a*sec(e + f*x) + a)* 
sec(e + f*x)**2, x) + Integral(a**2*sqrt(a*sec(e + f*x) + a)*sec(e + f*x)* 
*3, x))
 
3.1.59.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1396 vs. \(2 (118) = 236\).

Time = 0.42 (sec) , antiderivative size = 1396, normalized size of antiderivative = 10.58 \[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x)) \, dx=\text {Too large to display} \]

input
integrate((a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e)),x, algorithm="maxima")
 
output
1/6*(30*(cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*cos(2*f*x + 2*e) + 1) 
^(3/4)*a^(5/2)*sin(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1)) - 
2*(cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*cos(2*f*x + 2*e) + 1)^(1/4) 
*((12*a^2*cos(3/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))*sin(2*f*x + 
 2*e) - 3*a^2*sin(2*f*x + 2*e) - 4*(3*a^2*cos(2*f*x + 2*e) + 4*a^2)*sin(3/ 
2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))))*cos(3/2*arctan2(sin(2*f*x 
+ 2*e), cos(2*f*x + 2*e) + 1)) + (12*a^2*sin(2*f*x + 2*e)*sin(3/2*arctan2( 
sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 3*a^2*cos(2*f*x + 2*e) - a^2 + 4*(3 
*a^2*cos(2*f*x + 2*e) + 4*a^2)*cos(3/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x 
 + 2*e))))*sin(3/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1)))*sqrt( 
a) + 3*((a^2*cos(2*f*x + 2*e)^2 + a^2*sin(2*f*x + 2*e)^2 + 2*a^2*cos(2*f*x 
 + 2*e) + a^2)*arctan2((cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*cos(2* 
f*x + 2*e) + 1)^(1/4)*(cos(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)) 
)*sin(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1)) - cos(1/2*arcta 
n2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1))*sin(1/2*arctan2(sin(2*f*x + 2* 
e), cos(2*f*x + 2*e)))), (cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*cos( 
2*f*x + 2*e) + 1)^(1/4)*(cos(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e 
) + 1))*cos(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + sin(1/2*arc 
tan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1))*sin(1/2*arctan2(sin(2*f*x + 
2*e), cos(2*f*x + 2*e)))) + 1) - (a^2*cos(2*f*x + 2*e)^2 + a^2*sin(2*f*...
 
3.1.59.8 Giac [F]

\[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x)) \, dx=\int { -{\left (a \sec \left (f x + e\right ) + a\right )}^{\frac {5}{2}} {\left (c \sec \left (f x + e\right ) - c\right )} \,d x } \]

input
integrate((a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e)),x, algorithm="giac")
 
output
sage0*x
 
3.1.59.9 Mupad [F(-1)]

Timed out. \[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x)) \, dx=\int {\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^{5/2}\,\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right ) \,d x \]

input
int((a + a/cos(e + f*x))^(5/2)*(c - c/cos(e + f*x)),x)
 
output
int((a + a/cos(e + f*x))^(5/2)*(c - c/cos(e + f*x)), x)